PORTNAME=	tracker-miners
PORTVERSION=	3.5.2
CATEGORIES=	sysutils gnome
MASTER_SITES=	GNOME
DIST_SUBDIR=	gnome

MAINTAINER=	gnome@FreeBSD.org
COMMENT=	Miners for tracker2
WWW=		https://wiki.gnome.org/Projects/Tracker

LICENSE=	LGPL21
LICENSE_FILE=	${WRKSRC}/COPYING.LGPL

BUILD_DEPENDS=	asciidoc>0:textproc/asciidoc
LIB_DEPENDS=	libicuuc.so:devel/icu \
		libupower-glib.so:sysutils/upower \
		libexempi.so:textproc/exempi \
		libFLAC.so:audio/flac \
		libtotem-plparser.so:multimedia/totem-pl-parser \
		libpoppler-glib.so:graphics/poppler-glib \
		libpng.so:graphics/png \
		libtag.so:audio/taglib \
		libtiff.so:graphics/tiff \
		libgif.so:graphics/giflib \
		libvorbisfile.so:audio/libvorbis \
		libgxps.so:graphics/libgxps \
		libexif.so:graphics/libexif \
		libgexiv2.so:graphics/gexiv2 \
		libdbus-1.so:devel/dbus \
		libblkid.so:misc/e2fsprogs-libblkid \
		libtracker-sparql-3.0.so:sysutils/tracker3

PORTSCOUT=	limitw:1,even

USES=		gettext gnome gstreamer jpeg localbase:ldflags meson \
		pathfix pkgconfig python:3.7+,build sqlite tar:xz vala:build
USE_GNOME=	cairo glib20 intltool libgsf libxml2

MESON_ARGS=	-Dsystemd_user_services=false \
		-Diso=disabled \
		-Dcharset_detection=icu \
		-Dnetwork_manager=disabled \
		-Diptc=disabled \
		-Diso=disabled \
		-Dcue=disabled \
		-Dminer_rss=false \
		-Dseccomp=false \
		-Dbattery_detection=upower

OPTIONS_SUB=	yes
OPTIONS_DEFINE=		GSTREAMER
OPTIONS_DEFAULT=	GSTREAMER

GSTREAMER_USES=		gstreamer
GSTREAMER_LIB_DEPENDS=	libgupnp-dlna-2.0.so:net/gupnp-dlna
GSTREAMER_MESON_ON=	-Dgeneric_media_extractor=gstreamer \
			-Dgstreamer_backend=gupnp
GSTREAMER_MESON_OFF=	-Dgeneric_media_extractor=none

GLIB_SCHEMAS=	org.freedesktop.Tracker3.Extract.gschema.xml \
		org.freedesktop.Tracker3.FTS.gschema.xml \
		org.freedesktop.Tracker3.Miner.Files.gschema.xml \
		org.freedesktop.TrackerMiners3.enums.xml

.include <bsd.port.mk>
